<?php
Yii::import('application.models.Product');

class HotProductWidget extends CWidget{
    
    public function run(){
        $product = Product::model()->findAll(array(
            'condition' => 'promote = 1',
            'order' => 'update_time DESC',
            'limit' => '4',
        ));
        
        $this->render('HotProductWidget', array(
            'product' => $product
        ));
    }
}
?>
